<include file="Public:header"/>
<style>
	.table-striped tbody tr:hover {
		background-color: #CDDEFB;
	}
	.data-table tbody td {
		height: 40px;
		line-height: 40px;
	}
	.btn-primary {
		background-color: #1abc9c;
	}
</style>
<div id="main-content">
	<div id="top-alert" class="fixed alert alert-error" style="display: none;">
		<button class="close fixed" style="margin-top: 4px;">&times;</button>
		<div class="alert-content">警告内容</div>
	</div>
	<div id="main" class="main">
		<div class="main-title-h">
			<span class="h1-title">C2C提现记录</span>
		</div>
		<div class="cf">
<!--			<div class="fl">
				<button class="btn ajax-post confirm btn-danger" url="{:U('Exchange/orderStatus',array('type'=>'del'))}" target-form="ids">删除</button>
			</div>-->
			<div class="fl tongji">
				<span>待处理金额：<b style="color:#F98A3F">{$tongji['dcl']}</b></span>
				<span>已提现金额：<b style="color:#219B20">{$tongji['ywc']}</b></span>
				<span>取消订单金额：<b style="color:#FF474A">{$tongji['cx']}</b></span>
			</div>

			<div class="search-form fr cf">
				<div class="sleft">
					<form name="formSearch" id="formSearch" method="get" name="form1">
						<select style="width: 110px; float: left; margin-right: 10px;" name="status" class="form-control">
							<option value="99" <empty name="Think.get.status">selected</empty> >全部状态</option>
							<option value="1" <eq name="Think.get.status" value="1">selected</eq> >待处理</option>
							<option value="2" <eq name="Think.get.status" value="2">selected</eq> >处理中</option>
							<option value="3" <eq name="Think.get.status" value="3">selected</eq> >人工到账</option>
							<option value="8" <eq name="Think.get.status" value="8">selected</eq> >取消订单</option>
						</select>
						<select style=" width: 100px; float: left; margin-right: 10px;" name="field" class="form-control">
							<option value="username" <eq name="Think.get.field" value="username">selected</eq> >用户名</option>
							<option value="orderid" <eq name="Think.get.field" value="orderid">selected</eq> >订单号</option>
						</select>
						<input type="text" name="name" class="search-input form-control" value="{$Think.get.name}" placeholder="请输入查询内容" style="">
						<a class="sch-btn" href="javascript:;" id="search"> <i class="btn-search"></i> </a>
					</form>
					<script>
						//搜索功能
						$(function () {
							$('#search').click(function () {
								$('#formSearch').submit();
							});
						});
						//回车搜索
						$(".search-input").keyup(function (e) {
							if (e.keyCode === 13) {
								$("#search").click();
								return false;
							}
						});
					</script>
				</div>
			</div>
		</div>
		<div class="data-table table-striped">
			<form id="form" action="{:U('Exchange/mytxExcel')}" method="post" class="form-horizontal">
				<table class="">
					<thead>
					<tr>
						<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
						<th width="">编号</th>
						<th width="">订单号</th>
						<th width="">用户名</th>
						<th width="">提现金额</th>
						<th width="">实际汇款金额</th>
						<th width="">银行信息</th>
						<th width="">代理商</th>
						<th width="">申请时间</th>
						<th width="">确认时间</th>
						<th width="">状态</th>
						<th width="">操作</th>
					</tr>
					</thead>
					<tbody>
					<notempty name="list">
						<volist name="list" id="vo">
							<tr>
								<td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}"/></td>
								<td>{$vo.id}</td>
								<td><b style="color: #106EFF;">{$vo.orderid}</b></td>
								<td><a target="_blank" href="{:U('User/index')}?status=&field=username&starttime=&endtime=&name={$vo['username']}">{$vo['username']}</a></td>
								<td>{$vo.num}</td>
								<td><b style="color: #106EFF;">{$vo.mum}</b></td>
								<td>{$vo.bankname}</td>
								<td><a target="_blank" href="{:U('Exchange/agent')}?status=&field=username&starttime=&endtime=&name={$vo['agent']}">{$vo['agent']} ({$vo['aid']})</a></td>
								<td>{$vo.addtime|addtime}</td>
								<td>{$vo.endtime|addtime}</td>
								<td>
									<eq name="vo.status" value="0">未知</eq>
									<eq name="vo.status" value="1">待处理</eq>
									<eq name="vo.status" value="2">处理中</eq>
									<eq name="vo.status" value="3">人工汇款</eq>
									<eq name="vo.status" value="8">取消订单</eq>
								</td>
								<td>
									<eq name="vo.status" value="1">
										<a href="{:U('Exchange/mytxChuli?id='.$vo['id'])}" class="ajax-get btn btn-primary btn-xs">处理 </a>
										<a href="{:U('Exchange/mytxChexiao?id='.$vo['id'])}" class="ajax-get btn btn-info btn-xs">撤销 </a>
									</eq>
									<eq name="vo.status" value="2">
										<a href="{:U('Exchange/mytxQueren?id='.$vo['id'])}" class="ajax-get btn btn-primary">确认汇款 </a>
									</eq>
								</td>
							</tr>
						</volist>
						<else/>
						<td colspan="12" class="text-center empty-info"><i class="glyphicon glyphicon-exclamation-sign"></i>暂无数据</td>
					</notempty>
					</tbody>
				</table>
			</form>
            <div class="page">
                <div>{$page}</div>
            </div>
		</div>
	</div>
</div>
<script type="text/javascript">
//提交表单
$('#submit').click(function () {
	$('#form').submit();
});
$(".page > div").children("a").each(function(){
	var ahref = $(this).attr('href');
	var ahrefarr = ahref.split("/");
	var ahlength = ahrefarr.length;
	var newhref = '';
	for(var i=0;i<ahlength;i++){
		if(i<3 && i>0){
			newhref += "/"+ahrefarr[i];
		}
		if(i==3){
			newhref += "/"+ahrefarr[i]+".html?";
		}
		if(i>=4 && i%2==0){
			newhref += "&"+ahrefarr[i]+"="+ahrefarr[i+1];
		}
	}
	$(this).attr("href",newhref);
});
</script>
<include file="Public:footer"/>
<block name="script">
<script type="text/javascript" charset="utf-8">
	//导航高亮
	highlight_subnav("{:U('Exchange/mytx')}");
	$('title').html('C2C提现记录-'+'__WEBTITLE__');
</script>
</block>